/*
 * @Author: wwssaabb
 * @Date: 2021-08-16 16:36:07
 * @LastEditTime: 2021-08-16 17:04:49
 * @FilePath: \ts_demo\demo\record.ts
 */

/* 
  构造一个type，key为联合类型中的每个子类型，类型为T
*/
interface Eg1{
  name:string,
  age:number,
  sex:string
}
type a=keyof Eg1

type Eg2=Record<a,string>
type Eg3=Record<a,{key1:string}>

interface A{
  a:string,
  b:string
}

interface B{
  key1:string,
  key2:string
}

type Eg4=Record<keyof A,B>

export {}
